import request from '@/utils/request'

// 查询新闻动态列表
export function listNewsInfo(query) {
  return request({
    url: '/business/newsInfo/list',
    method: 'get',
    params: query
  })
}

// 查询新闻动态所有列表
export function listAllNewsInfo(query) {
  return request({
    url: '/business/newsInfo/listAll',
    method: 'get',
    params: query
  })
}

// 查询新闻动态详细
export function getNewsInfo(id) {
  return request({
    url: '/business/newsInfo/getInfo/' + id,
    method: 'get'
  })
}

// 新增新闻动态
export function addNewsInfo(data) {
  return request({
    url: '/business/newsInfo/add',
    method: 'post',
    data: data
  })
}

// 修改新闻动态
export function updateNewsInfo(data) {
  return request({
    url: '/business/newsInfo/edit',
    method: 'post',
    data: data
  })
}

// 删除新闻动态
export function delNewsInfo(id) {
  return request({
    url: '/business/newsInfo/remove/' + id,
    method: 'get'
  })
}
